﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<service_desk_blred.Models.ListaFornecedorModel>" %>

<asp:Content ID="registerTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Gerenciar Fornecedores
</asp:Content>
<asp:Content ID="registerContent" ContentPlaceHolderID="MainContent" runat="server">
    <h3>
        Lista de Fornecedores</h3>
    <div class="gridView" style="width: auto;">
        <table>
            <tr>
                <td>
                    Nome Fornecedor
                </td>
                <td>
                    Ação
                </td>
            </tr>
            <% 
                foreach (var item in Model.fornecedores)
                {  
            %>
            <tr>
                <td>
                    <%: item.NomeFornecedor %>
                </td>
                <td>
                    <%: Html.ActionLink("Editar", "Editar", "Fornecedor", new { id = item.idFornecedor },null)%>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <%: Html.ActionLink("Excluir", "Excluir", "Fornecedor", new { id = item.idFornecedor }, null)%>
                </td>
            </tr>
            <% }

            %>
        </table>

        <p>
        <input type="button" class="button" value="Voltar" onclick="window.location.href='<%= Url.Action("Login", "Inicio") %>';" />
            <input type="button" class="button" value="Voltar" onclick="window.location.href='<%= Url.Action("Login", "Inicio") %>';" /></p>
    </div>
</asp:Content>
